package com.iwuke.dance.wallet.settings;

import android.view.View;
import android.widget.RelativeLayout;

import com.iwuke.dance.R;
import com.iwuke.dance.activity.BaseActivity;
import com.iwuke.dance.gadget_view.TitleBarView;
import com.iwuke.dance.util.ToastUtil;
import com.iwuke.dance.util.Util;
import com.iwuke.dance.util.merchants_connect.NetworkEvent;

import de.greenrobot.event.Subscribe;
import de.greenrobot.event.ThreadMode;

/**
 * @author: 魏从响
 * @date: 2025/10/9
 * 钱包设置
 */
public class WalletSettingsActivity extends BaseActivity implements View.OnClickListener {

    private TitleBarView title_bar;
    private RelativeLayout rlt_payment_password;
    private RelativeLayout rlt_biological_payment;
    private RelativeLayout rlt_balance_reminder;
    private RelativeLayout rlt_coupon;

    /**
     * @description 网络实时监听
     */
    @Subscribe(threadMode = ThreadMode.MainThread)
    public void onEvent(NetworkEvent networkEvent){
        BaseActivity.setConnect(WalletSettingsActivity.this,networkEvent,title_bar);
    }

    @Override
    protected int getView() {
        return R.layout.activity_wallet_settings;
    }

    @Override
    protected void init(View mView) {

        title_bar = findViewById(R.id.title_bar);
        //支付密码
        rlt_payment_password = findViewById(R.id.rlt_payment_password);
        //生物支付
        rlt_biological_payment = findViewById(R.id.rlt_biological_payment);
        //余额提醒
        rlt_balance_reminder = findViewById(R.id.rlt_balance_reminder);
        //优惠券到期提醒
        rlt_coupon = findViewById(R.id.rlt_coupon);



        title_bar.setTitleText("钱包设置");
        title_bar.setLeftOnClick(this);
        //支付密码
        rlt_payment_password.setOnClickListener(this);
        //生物支付
        rlt_biological_payment.setOnClickListener(this);
        //余额提醒
        rlt_balance_reminder.setOnClickListener(this);
        //优惠券到期提醒
        rlt_coupon.setOnClickListener(this);

    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View v) {
        if (v.getId()==R.id.img_left){
            finish();
        }else if (v.getId()==R.id.rlt_payment_password){//支付密码
            Util.setIntent(WalletSettingsActivity.this,PaymentPasswordActivity.class);
        }else if (v.getId()==R.id.rlt_biological_payment){//生物支付
            ToastUtil.setToast(WalletSettingsActivity.this,"开发中...");
        }else if (v.getId()==R.id.rlt_balance_reminder){//余额提醒
            ToastUtil.setToast(WalletSettingsActivity.this,"开发中...");
        }else if (v.getId()==R.id.rlt_coupon){//优惠券到期提醒
            ToastUtil.setToast(WalletSettingsActivity.this,"开发中...");
        }
    }
}
